public class Fish {
    private String color;
    private int age;

    public Fish() {
    }

    public Fish(String color, int age) {
        this.color = color;
        this.age = age;
    }

    public void eat() {
        System.out.println("鱼吃饭");
    }

    public String getColor() {
        return color;
    }

    public void setColor(String color) {
        this.color = color;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        if(age < 0){
            return;
        }
        this.age = age;
    }
}
